package com.dhnsoft.strategy;

import com.dhnsoft.tank.MyTank;

/**
 * @Description
 * @ClassName DefaultFireStrategy
 * @Author dhn
 * @date 2020.11.14 20:45
 */
public class DefaultFireStrategy implements FireStrategy {
    @Override
    public void fire(MyTank player) {
        int bX= player.getX()+ ResourceMgr.goodTankU.getWidth()/2-ResourceMgr.bulletU.getWidth()/2;
        int bY=player.getY()+ResourceMgr.goodTankU.getHeight()/2-ResourceMgr.bulletU.getHeight()/2;
        //四个方向发射子弹
//        for (Dir d : dirs) {
//            TankFrame.INSTANCE.add(new Bullet(bX,bY,d, player.getGroup()));
//        }
//        TankFrame.INSTANCE.add(new Bullet(bX,bY,player.getDir(), player.getGroup()));
    }
}
